package com.he.architecture.service;

import com.he.architecture.Enums.CustomerOrderTypeEnums;
import com.he.architecture.common.service.LogicService;
import com.he.architecture.dao.CustomerOrderDao;
import com.he.architecture.entity.CustomerOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.print.DocFlavor;
import java.util.List;

@Service
public class CustomerOrderService extends LogicService<CustomerOrderDao, CustomerOrder,Long> {
    /**
     * 默认构造器
     */
    public CustomerOrderService(@Autowired CustomerOrderDao cd) {
        super(cd);
    }

    public CustomerOrder getCustomerOrderByCustomerId(Long bus_Id,Long shop_id){
        return getDAO().getCustomerOrderByCustomerIdAndOrderTypeAndShopId(bus_Id,CustomerOrderTypeEnums.NOT_PAYED.getCode(),shop_id);
    }
}